import com.hotel.Application;
import com.hotel.entity.RoomType;
import com.hotel.mapper.RoomTypeMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @author 夏智力
 * @FileName Demo
 * @date 2021/6/22 11:40
 * @Software: IntelliJ IDEA
 */
@SpringBootTest
@RunWith(SpringRunner.class)
@ContextConfiguration(classes = Application.class)
public class Demo {


    @Autowired
    private RoomTypeMapper roomTypeMapper;

    @Test
    public void demo01(){
        RoomType roomType = new RoomType();
        roomType.setId(1);
        roomType.setTypeName("大床房");
        roomType.setDescribes("两米的大床");
        roomType.setNumbers(10);
        roomTypeMapper.updateRoomType(roomType);
    }

    @Test
    public void demo02(){
        RoomType roomType = new RoomType();
        roomType.setId(1);
        roomType.setTypeName("双床房");
        roomTypeMapper.updateRoomType(roomType);
    }




}
